using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VWTWIR
    {
        public DataRow Convert2WTWIR(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryWTWIR(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                    #region=========
         dwReturn["WTWMANDANT"] = " ".PadRight(2 ); 
         dwReturn["WTWKUNDNR"] = " ".PadRight(8 ); 
         dwReturn["WTWWERK"] = " ".PadRight(3 ); 
         dwReturn["WTWABT"] = " ".PadRight(3 ); 
         dwReturn["WTWART"] = " ".PadRight(20 ); 
         dwReturn["WTWVAR"] = " ".PadRight(2 ); 
         dwReturn["WTWAUSART"] = " ".PadRight(20 ); 
         dwReturn["WTWAUSVAR"] = " ".PadRight(2 ); 
         dwReturn["WTWABRT"] = " ".PadRight(0 ); 
         dwReturn["WTWNAZAHL"] = " ".PadRight(0 ); 
         dwReturn["WTWFEINH"] = " ".PadRight(0 ); 
         dwReturn["WTWFEINHGE"] = " ".PadRight(1 ); 
         dwReturn["WTWSCHIEG"] = " ".PadRight(0 ); 
         dwReturn["WTWSCHIEM"] = " ".PadRight(0 ); 
         dwReturn["WTWBINDG"] = " ".PadRight(15 ); 
         dwReturn["WTWBINDM"] = " ".PadRight(15 ); 
         dwReturn["WTWEINZG"] = " ".PadRight(15 ); 
         dwReturn["WTWEINZM"] = " ".PadRight(15 ); 
         dwReturn["WTWEINZR"] = " ".PadRight(15 ); 
         dwReturn["WTWKETTGL"] = " ".PadRight(0 ); 
         dwReturn["WTWFADENF"] = " ".PadRight(0 ); 
         dwReturn["WTWSSCHEM"] = " ".PadRight(15 ); 
         dwReturn["WTWJACPKT"] = " ".PadRight(0 ); 
         dwReturn["WTWMRSTEG"] = " ".PadRight(0 ); 
         dwReturn["WTWMRUM"] = " ".PadRight(0 ); 
         dwReturn["WTWMRFRAES"] = " ".PadRight(0 ); 
         dwReturn["WTWABZUG"] = " ".PadRight(0 ); 
         dwReturn["WTWABZUGR"] = " ".PadRight(0 ); 
         dwReturn["WTWWICKBRT"] = " ".PadRight(0 ); 
         dwReturn["WTWWICKBRTV"] = " ".PadRight(0 ); 
         dwReturn["WTWWICKBRTB"] = " ".PadRight(0 ); 
         dwReturn["WTWFEHLER"] = " ".PadRight(0 ); 
         dwReturn["WTWBROVERL"] = " ".PadRight(0 ); 
         dwReturn["WTWRWBRT"] = " ".PadRight(0 ); 
         dwReturn["WTWRWGEW"] = " ".PadRight(0 ); 
         dwReturn["WTWRWMADI"] = " ".PadRight(0 ); 
         dwReturn["WTWRWMADIM"] = " ".PadRight(3 ); 
         dwReturn["WTWRWMADIF"] = " ".PadRight(12 ); 
         dwReturn["WTWRWFDDI"] = " ".PadRight(0 ); 
         dwReturn["WTWRWFDDIM"] = " ".PadRight(3 ); 
         dwReturn["WTWRWFDDIF"] = " ".PadRight(12 ); 
         dwReturn["WTWRWGVERB"] = " ".PadRight(0 ); 
         dwReturn["WTWABGBRT"] = " ".PadRight(0 ); 
         dwReturn["WTWABGGEW"] = " ".PadRight(0 ); 
         dwReturn["WTWABGMADI"] = " ".PadRight(0 ); 
         dwReturn["WTWABGMADIM"] = " ".PadRight(3 ); 
         dwReturn["WTWABGMADIF"] = " ".PadRight(12 ); 
         dwReturn["WTWABGFDDI"] = " ".PadRight(0 ); 
         dwReturn["WTWABGFDDIM"] = " ".PadRight(3 ); 
         dwReturn["WTWABGFDDIF"] = " ".PadRight(12 ); 
         dwReturn["WTWABGGVERB"] = " ".PadRight(0 ); 
         dwReturn["WTWEINLR"] = " ".PadRight(0 ); 
         dwReturn["WTWANZRAP"] = " ".PadRight(0 ); 
         dwReturn["WTWANZBAND"] = " ".PadRight(0 ); 
         dwReturn["WTWGEWMA"] = " ".PadRight(0 ); 
         dwReturn["WTWGEWOA"] = " ".PadRight(0 ); 
         dwReturn["WTWRANDBRT"] = " ".PadRight(0 ); 
         dwReturn["WTWRANDGEW"] = " ".PadRight(0 ); 
         dwReturn["WTWMASCHR"] = " ".PadRight(0 ); 
         dwReturn["WTWRWRAPH"] = " ".PadRight(0 ); 
         dwReturn["WTWABGRAPH"] = " ".PadRight(0 ); 
         dwReturn["WTWMASCHS"] = " ".PadRight(0 ); 
         dwReturn["WTWRWRAPB"] = " ".PadRight(0 ); 
         dwReturn["WTWABGRAPB"] = " ".PadRight(0 ); 
         dwReturn["WTWFILLER"] = " ".PadRight(71 ); 
         dwReturn["WTWAENZL"] = " ".PadRight(0 ); 
         dwReturn["WTWAENB"] = " ".PadRight(8 ); 
         dwReturn["WTWAEND"] = " ".PadRight(0 ); 
         dwReturn["WTWNEUB"] = " ".PadRight(8 ); 
         dwReturn["WTWNEUD"] = " ".PadRight(0 ); 
                    #endregion
                    break;
                case "JLT":

                    break;
                default:

                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapWTWIR(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveWTWIR(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryWTWIR(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapWTWIR(ref dwLocal, dwData);

            if (!flgExist)
            {

                InsertWTWIR(dwLocal, ITXDBVERSION);
            }
            UpdateWTWIR(dwLocal);
        }
        public void InsertWTWIR(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                    or1.CommandText = "INSERT INTO WTWIR(VAKBMANDANT, VAKBKOLL, VAKBART, VAKBKUNDNR, VAKBFARBE, VAKBKDARTNR, VAKBKDARTBEZ, VAKBKDFARBNR, VAKBANDRUCK, VAKBMEGEW, VAKBMENGEH, VAKBGEWVON, VAKBGEWBIS, VAKBGEWCA, VAKBGEWFKT, VAKBGEWGRP, VAKBMEGFKT, VAKBMEGGRP, VAKBAENDZL, VAKBAENDBEN, VAKBAENDDAT, VAKBNEUBEN, VAKBNEUDAT, VAKBFILLER)"
                        + " VALUES (:VAKBMANDANT, :VAKBKOLL, :VAKBART, :VAKBKUNDNR, :VAKBFARBE, '                         ', '                         ', '                             ', ' ', '   ', '   ', 0, 0, ' ', '000000000000', ' ', '000000000000', ' ', 0, '        ', '000000', '        ', '      ', '                                          ')";
                    or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                //VAFMANDANT VAFKOLL VAFART VAFFARBE VAFBEZ VAFFFARBE

            }
            
            Connect2Proxy(or1);
        }
        public DataSet QueryWTWIR(DataRow dwData, int option = 1)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM WTWIR WHERE  ROWNUM<2 ";
                    break;
              
                case 99:
                    or1.CommandText = "SELECT * FROM WTWIR  WHERE ROWNUM<50";
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "WTWIR";
            Return = Result;
            return Return;
        }
        public void DeleteWTWIR(DataRow dwData, int option = 1)
        {

            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "DELETE FROM WTWIR   WHERE  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                     or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                default:
                    break;
            }
            Connect2Proxy(or1);
        } 
      
        public void UpdateWTWIR(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            OracleCommand or1;
            DataSet Result = new DataSet();
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region====Command==== 
                    or1.CommandText = "UPDATE WTWIR SET "
                    +"WTWMANDANT= :WTWMANDANT,"
                    +"WTWKUNDNR= :WTWKUNDNR,"
                    +"WTWWERK= :WTWWERK,"
                    +"WTWABT= :WTWABT,"
                    +"WTWART= :WTWART,"
                    +"WTWVAR= :WTWVAR,"
                    +"WTWAUSART= :WTWAUSART,"
                    +"WTWAUSVAR= :WTWAUSVAR,"
                    +"WTWABRT= :WTWABRT,"
                    +"WTWNAZAHL= :WTWNAZAHL,"
                    +"WTWFEINH= :WTWFEINH,"
                    +"WTWFEINHGE= :WTWFEINHGE,"
                    +"WTWSCHIEG= :WTWSCHIEG,"
                    +"WTWSCHIEM= :WTWSCHIEM,"
                    +"WTWBINDG= :WTWBINDG,"
                    +"WTWBINDM= :WTWBINDM,"
                    +"WTWEINZG= :WTWEINZG,"
                    +"WTWEINZM= :WTWEINZM,"
                    +"WTWEINZR= :WTWEINZR,"
                    +"WTWKETTGL= :WTWKETTGL,"
                    +"WTWFADENF= :WTWFADENF,"
                    +"WTWSSCHEM= :WTWSSCHEM,"
                    +"WTWJACPKT= :WTWJACPKT,"
                    +"WTWMRSTEG= :WTWMRSTEG,"
                    +"WTWMRUM= :WTWMRUM,"
                    +"WTWMRFRAES= :WTWMRFRAES,"
                    +"WTWABZUG= :WTWABZUG,"
                    +"WTWABZUGR= :WTWABZUGR,"
                    +"WTWWICKBRT= :WTWWICKBRT,"
                    +"WTWWICKBRTV= :WTWWICKBRTV,"
                    +"WTWWICKBRTB= :WTWWICKBRTB,"
                    +"WTWFEHLER= :WTWFEHLER,"
                    +"WTWBROVERL= :WTWBROVERL,"
                    +"WTWRWBRT= :WTWRWBRT,"
                    +"WTWRWGEW= :WTWRWGEW,"
                    +"WTWRWMADI= :WTWRWMADI,"
                    +"WTWRWMADIM= :WTWRWMADIM,"
                    +"WTWRWMADIF= :WTWRWMADIF,"
                    +"WTWRWFDDI= :WTWRWFDDI,"
                    +"WTWRWFDDIM= :WTWRWFDDIM,"
                    +"WTWRWFDDIF= :WTWRWFDDIF,"
                    +"WTWRWGVERB= :WTWRWGVERB,"
                    +"WTWABGBRT= :WTWABGBRT,"
                    +"WTWABGGEW= :WTWABGGEW,"
                    +"WTWABGMADI= :WTWABGMADI,"
                    +"WTWABGMADIM= :WTWABGMADIM,"
                    +"WTWABGMADIF= :WTWABGMADIF,"
                    +"WTWABGFDDI= :WTWABGFDDI,"
                    +"WTWABGFDDIM= :WTWABGFDDIM,"
                    +"WTWABGFDDIF= :WTWABGFDDIF,"
                    +"WTWABGGVERB= :WTWABGGVERB,"
                    +"WTWEINLR= :WTWEINLR,"
                    +"WTWANZRAP= :WTWANZRAP,"
                    +"WTWANZBAND= :WTWANZBAND,"
                    +"WTWGEWMA= :WTWGEWMA,"
                    +"WTWGEWOA= :WTWGEWOA,"
                    +"WTWRANDBRT= :WTWRANDBRT,"
                    +"WTWRANDGEW= :WTWRANDGEW,"
                    +"WTWMASCHR= :WTWMASCHR,"
                    +"WTWRWRAPH= :WTWRWRAPH,"
                    +"WTWABGRAPH= :WTWABGRAPH,"
                    +"WTWMASCHS= :WTWMASCHS,"
                    +"WTWRWRAPB= :WTWRWRAPB,"
                    +"WTWABGRAPB= :WTWABGRAPB,"
                    +"WTWFILLER= :WTWFILLER,"
                    +"WTWAENZL= :WTWAENZL,"
                    +"WTWAENB= :WTWAENB,"
                    +"WTWAEND= :WTWAEND,"
                    +"WTWNEUB= :WTWNEUB,"
                    +"WTWNEUD= :WTWNEUD,"
                        + " WHERE  "
                        + "  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                    #endregion

                    #region====Parameters====
          or1.Parameters.Add("WTWMANDANT", OracleType.NVarChar).Value = dwData["WTWMANDANT"].ToString(); 
          or1.Parameters.Add("WTWKUNDNR", OracleType.NVarChar).Value = dwData["WTWKUNDNR"].ToString(); 
          or1.Parameters.Add("WTWWERK", OracleType.NVarChar).Value = dwData["WTWWERK"].ToString(); 
          or1.Parameters.Add("WTWABT", OracleType.NVarChar).Value = dwData["WTWABT"].ToString(); 
          or1.Parameters.Add("WTWART", OracleType.NVarChar).Value = dwData["WTWART"].ToString(); 
          or1.Parameters.Add("WTWVAR", OracleType.NVarChar).Value = dwData["WTWVAR"].ToString(); 
          or1.Parameters.Add("WTWAUSART", OracleType.NVarChar).Value = dwData["WTWAUSART"].ToString(); 
          or1.Parameters.Add("WTWAUSVAR", OracleType.NVarChar).Value = dwData["WTWAUSVAR"].ToString(); 
          or1.Parameters.Add("WTWABRT", OracleType.NVarChar).Value = dwData["WTWABRT"].ToString(); 
          or1.Parameters.Add("WTWNAZAHL", OracleType.NVarChar).Value = dwData["WTWNAZAHL"].ToString(); 
          or1.Parameters.Add("WTWFEINH", OracleType.NVarChar).Value = dwData["WTWFEINH"].ToString(); 
          or1.Parameters.Add("WTWFEINHGE", OracleType.NVarChar).Value = dwData["WTWFEINHGE"].ToString(); 
          or1.Parameters.Add("WTWSCHIEG", OracleType.NVarChar).Value = dwData["WTWSCHIEG"].ToString(); 
          or1.Parameters.Add("WTWSCHIEM", OracleType.NVarChar).Value = dwData["WTWSCHIEM"].ToString(); 
          or1.Parameters.Add("WTWBINDG", OracleType.NVarChar).Value = dwData["WTWBINDG"].ToString(); 
          or1.Parameters.Add("WTWBINDM", OracleType.NVarChar).Value = dwData["WTWBINDM"].ToString(); 
          or1.Parameters.Add("WTWEINZG", OracleType.NVarChar).Value = dwData["WTWEINZG"].ToString(); 
          or1.Parameters.Add("WTWEINZM", OracleType.NVarChar).Value = dwData["WTWEINZM"].ToString(); 
          or1.Parameters.Add("WTWEINZR", OracleType.NVarChar).Value = dwData["WTWEINZR"].ToString(); 
          or1.Parameters.Add("WTWKETTGL", OracleType.NVarChar).Value = dwData["WTWKETTGL"].ToString(); 
          or1.Parameters.Add("WTWFADENF", OracleType.NVarChar).Value = dwData["WTWFADENF"].ToString(); 
          or1.Parameters.Add("WTWSSCHEM", OracleType.NVarChar).Value = dwData["WTWSSCHEM"].ToString(); 
          or1.Parameters.Add("WTWJACPKT", OracleType.NVarChar).Value = dwData["WTWJACPKT"].ToString(); 
          or1.Parameters.Add("WTWMRSTEG", OracleType.NVarChar).Value = dwData["WTWMRSTEG"].ToString(); 
          or1.Parameters.Add("WTWMRUM", OracleType.NVarChar).Value = dwData["WTWMRUM"].ToString(); 
          or1.Parameters.Add("WTWMRFRAES", OracleType.NVarChar).Value = dwData["WTWMRFRAES"].ToString(); 
          or1.Parameters.Add("WTWABZUG", OracleType.NVarChar).Value = dwData["WTWABZUG"].ToString(); 
          or1.Parameters.Add("WTWABZUGR", OracleType.NVarChar).Value = dwData["WTWABZUGR"].ToString(); 
          or1.Parameters.Add("WTWWICKBRT", OracleType.NVarChar).Value = dwData["WTWWICKBRT"].ToString(); 
          or1.Parameters.Add("WTWWICKBRTV", OracleType.NVarChar).Value = dwData["WTWWICKBRTV"].ToString(); 
          or1.Parameters.Add("WTWWICKBRTB", OracleType.NVarChar).Value = dwData["WTWWICKBRTB"].ToString(); 
          or1.Parameters.Add("WTWFEHLER", OracleType.NVarChar).Value = dwData["WTWFEHLER"].ToString(); 
          or1.Parameters.Add("WTWBROVERL", OracleType.NVarChar).Value = dwData["WTWBROVERL"].ToString(); 
          or1.Parameters.Add("WTWRWBRT", OracleType.NVarChar).Value = dwData["WTWRWBRT"].ToString(); 
          or1.Parameters.Add("WTWRWGEW", OracleType.NVarChar).Value = dwData["WTWRWGEW"].ToString(); 
          or1.Parameters.Add("WTWRWMADI", OracleType.NVarChar).Value = dwData["WTWRWMADI"].ToString(); 
          or1.Parameters.Add("WTWRWMADIM", OracleType.NVarChar).Value = dwData["WTWRWMADIM"].ToString(); 
          or1.Parameters.Add("WTWRWMADIF", OracleType.NVarChar).Value = dwData["WTWRWMADIF"].ToString(); 
          or1.Parameters.Add("WTWRWFDDI", OracleType.NVarChar).Value = dwData["WTWRWFDDI"].ToString(); 
          or1.Parameters.Add("WTWRWFDDIM", OracleType.NVarChar).Value = dwData["WTWRWFDDIM"].ToString(); 
          or1.Parameters.Add("WTWRWFDDIF", OracleType.NVarChar).Value = dwData["WTWRWFDDIF"].ToString(); 
          or1.Parameters.Add("WTWRWGVERB", OracleType.NVarChar).Value = dwData["WTWRWGVERB"].ToString(); 
          or1.Parameters.Add("WTWABGBRT", OracleType.NVarChar).Value = dwData["WTWABGBRT"].ToString(); 
          or1.Parameters.Add("WTWABGGEW", OracleType.NVarChar).Value = dwData["WTWABGGEW"].ToString(); 
          or1.Parameters.Add("WTWABGMADI", OracleType.NVarChar).Value = dwData["WTWABGMADI"].ToString(); 
          or1.Parameters.Add("WTWABGMADIM", OracleType.NVarChar).Value = dwData["WTWABGMADIM"].ToString(); 
          or1.Parameters.Add("WTWABGMADIF", OracleType.NVarChar).Value = dwData["WTWABGMADIF"].ToString(); 
          or1.Parameters.Add("WTWABGFDDI", OracleType.NVarChar).Value = dwData["WTWABGFDDI"].ToString(); 
          or1.Parameters.Add("WTWABGFDDIM", OracleType.NVarChar).Value = dwData["WTWABGFDDIM"].ToString(); 
          or1.Parameters.Add("WTWABGFDDIF", OracleType.NVarChar).Value = dwData["WTWABGFDDIF"].ToString(); 
          or1.Parameters.Add("WTWABGGVERB", OracleType.NVarChar).Value = dwData["WTWABGGVERB"].ToString(); 
          or1.Parameters.Add("WTWEINLR", OracleType.NVarChar).Value = dwData["WTWEINLR"].ToString(); 
          or1.Parameters.Add("WTWANZRAP", OracleType.NVarChar).Value = dwData["WTWANZRAP"].ToString(); 
          or1.Parameters.Add("WTWANZBAND", OracleType.NVarChar).Value = dwData["WTWANZBAND"].ToString(); 
          or1.Parameters.Add("WTWGEWMA", OracleType.NVarChar).Value = dwData["WTWGEWMA"].ToString(); 
          or1.Parameters.Add("WTWGEWOA", OracleType.NVarChar).Value = dwData["WTWGEWOA"].ToString(); 
          or1.Parameters.Add("WTWRANDBRT", OracleType.NVarChar).Value = dwData["WTWRANDBRT"].ToString(); 
          or1.Parameters.Add("WTWRANDGEW", OracleType.NVarChar).Value = dwData["WTWRANDGEW"].ToString(); 
          or1.Parameters.Add("WTWMASCHR", OracleType.NVarChar).Value = dwData["WTWMASCHR"].ToString(); 
          or1.Parameters.Add("WTWRWRAPH", OracleType.NVarChar).Value = dwData["WTWRWRAPH"].ToString(); 
          or1.Parameters.Add("WTWABGRAPH", OracleType.NVarChar).Value = dwData["WTWABGRAPH"].ToString(); 
          or1.Parameters.Add("WTWMASCHS", OracleType.NVarChar).Value = dwData["WTWMASCHS"].ToString(); 
          or1.Parameters.Add("WTWRWRAPB", OracleType.NVarChar).Value = dwData["WTWRWRAPB"].ToString(); 
          or1.Parameters.Add("WTWABGRAPB", OracleType.NVarChar).Value = dwData["WTWABGRAPB"].ToString(); 
          or1.Parameters.Add("WTWFILLER", OracleType.NVarChar).Value = dwData["WTWFILLER"].ToString(); 
          or1.Parameters.Add("WTWAENZL", OracleType.NVarChar).Value = dwData["WTWAENZL"].ToString(); 
          or1.Parameters.Add("WTWAENB", OracleType.NVarChar).Value = dwData["WTWAENB"].ToString(); 
          or1.Parameters.Add("WTWAEND", OracleType.NVarChar).Value = dwData["WTWAEND"].ToString(); 
          or1.Parameters.Add("WTWNEUB", OracleType.NVarChar).Value = dwData["WTWNEUB"].ToString(); 
          or1.Parameters.Add("WTWNEUD", OracleType.NVarChar).Value = dwData["WTWNEUD"].ToString(); 
                    #endregion
                    break; 
                default:
                    break;
            }


            Connect2Proxy(or1);
        }
    }
}
